/*
 * Mmap.hpp
 *
 *  Created on: Nov 5, 2013
 *      Author: vladimir
 */

#ifndef MMAP_HPP_
#define MMAP_HPP_

namespace vjipc
{

enum class AccessType;


class Mmap
{
public:

	Mmap( const vjipc::AccessType & accessType,
	      const int fd,
	      const unsigned int length );
	~Mmap();

	Mmap( const Mmap& ) = delete;
	Mmap& operator=( const Mmap& ) = delete;

	Mmap( Mmap&& rhs );
	Mmap& operator=( Mmap&& rhs );


	void* GetAddressToMmappedRegion() const;

private:

	unsigned int length;
	void* address;
};

} /* namespace vjipc */

#endif /* MMAP_HPP_ */
